package com.sky.mapper;

import com.sky.annotation.AutoFill;
import com.sky.entity.DishFlavor;
import com.sky.enumeration.OperationType;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * ClassName: DishFlavorMapper
 * Package: com.sky.mapper
 * Description:
 *
 * @Author BuTang
 * @Create 2023/10/25 13:19
 * @Version 1.0
 */
@Mapper
public interface DishFlavorMapper {

    /**
     * 新增菜品口味
     * @param flavors
     */
    @AutoFill(OperationType.INSERT)
    public void insertBatch(List<DishFlavor> flavors) ;

    /**
     * 删除菜品
     * @param ids
     */
    void deleteByDishId(List<Long> ids);


    /**
     * 根据菜品id查询口味
     * @param id
     * @return
     */
    List<DishFlavor> getByDishId(Long id);
}
